// 任务管理 all

import { http } from "@/utils/http";
import { baseUrlApi } from "../utils";

// 开启任务
export const OpentaskOnOpen = (params: string) => {
  return http.request<any>("post", baseUrlApi("/Opentask/OnOpen?" + params));
};

// 重做任务
export const OpentaskOnRedo = (params: string) => {
  return http.request<any>("post", baseUrlApi("/Opentask/OnRedo?" + params));
};

// 提交任务
export const OpentaskOnSubmit = (params: string) => {
  return http.request<any>("post", baseUrlApi("/Opentask/OnSubmit?" + params));
};

// 提交竞赛任务
export const onSubmitCompetition = () => {
  return http.request<any>("get", baseUrlApi("/Opentask/OnSubmitCompetition"));
};

// 获取用户所有任务
export const GetUserAllTask = () => {
  return http.request<any>("get", baseUrlApi("/Task/GetUserAllTask"));
};
